using System;
using System.ComponentModel.DataAnnotations;

namespace UcAsp.Net.Model
{
    [Table("Comments")]
    public class Comments
    {
        [Key]
        public int ID { get; set; }

        public int ArticleID { get; set; }

        public int UserID { get; set; }

        public string UserName { get; set; }

        public string Title { get; set; }

        public string PublichContent { get; set; }

        public DateTime PublicDate { get; set; }

        public int ParentID { get; set; }

        public DateTime ReplyDateTime { get; set; }

        public bool IsRelease { get; set; }

        [ForeignKey("ArticleID")]
        public virtual Articles Articles { get; set; }

        [ForeignKey("UserID")]
        public virtual UserInfo UserInfo { get; set; }

        [ForeignKey("ParentID")]
        public virtual Comments Replay { get; set; }
    }
}